#pragma once
#include <ntifs.h>
#include <ntddk.h>
#include "ntfunction.h"

#ifdef DBG
    #define DBGPRINT(_fmt, ...) DbgPrint(_fmt, __VA_ARGS__)
    #define ERRPRINT(s, c) \
        const char* str##s = #s;\
        DbgPrint("%s: %s Error, Code: %X\r\n", __FUNCTION__, str##s, c)
    #define INT3    KdBreakPoint()
#else
    #define DBGPRINT(_fmt, ...) { NOTHING; }
    #define ERRPRINT(s, c)
    #define INT3
#endif

#define USTRING_DEVICE_NAME     L"\\Device\\TestControl"
#define USTRING_SYMBOL_NAME     L"\\DosDevices\\TestControl"

typedef NTSTATUS (*FnZwQueryInformationProcess)(
  _In_      HANDLE           ProcessHandle,
  _In_      PROCESSINFOCLASS ProcessInformationClass,
  _Out_     PVOID            ProcessInformation,
  _In_      ULONG            ProcessInformationLength,
  _Out_opt_ PULONG           ReturnLength
);

typedef struct _DRIVER_GLOBALS
{
    PDRIVER_OBJECT lpDriverObject;
    PDEVICE_OBJECT lpDeviceObject;
}DRIVER_GLOBALS, * PDRIVER_GLOBALS;

extern DRIVER_GLOBALS DrvGlobals;
extern FnZwQueryInformationProcess __ZwQueryInformationProcess;
